package com.guigu.www.denghao.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.guigu.www.denghao.service.DHShortcutService;
import com.guigu.www.mapper.ShortcutMapper;
import com.guigu.www.pojo.Shortcut;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DHShortcutServiceImpl implements DHShortcutService {

    @Autowired
    private ShortcutMapper shortcutMapper;

    @Override
    public Integer addShortcut(Shortcut shortcut) {
        return shortcutMapper.insert(shortcut);
    }

    @Override
    public List<Shortcut> queryByHmIdShortcut(Integer hmId) {
        return shortcutMapper.selectList(new QueryWrapper<Shortcut>().eq("hm_id",hmId));
    }

    @Override
    public Integer delShortcutById(Integer shoId) {
        return shortcutMapper.deleteById(shoId);
    }
}
